#include <iostream>
#include<cmath>
typedef long long LL;
using namespace std;
LL a, b;

LL find(LL mid)//注意类型问题
{
    LL p = 1;
    LL q = a;
    for (LL i = 1;i <= b;i++)
    {
        p = p * mid;
        q = q * 1000;
    }
    if (p > q) return 1;//说明搞大了
    else if (p == q) return 0;
    else return -1;
}
int main()
{
    // 请在此输入您的代码
    cin >> a >> b;
    //double x = sqrt(a);//这个逆天题注意不要以为答案一定在1到这个数开平方之间
    //因为这个题说是求高次密，但是他的b是1到5
    LL r = a*1000;
    LL l = 1;
    while (l < r)
    {
        LL mid = (l + r+1) / 2;
        if (find(mid) <= 0) l = mid;
        else r = mid -1;
    }
   
    cout <<l << endl;
    return 0;
}